﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RecordList.aspx.cs" Inherits="CRM.Web.RecordManage.RecordList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('.recordPlay').bind("click", function() {
                var inum = $(this).attr("title");
                var url = "RecordPlay.aspx?INUM=" + inum;
                $('#framePlay').attr("src", url);
                return false;
            });
        });
    
    
    </script>
</head>
<body>
    <form id="form1" runat="server"  defaultbutton="btnSearch" >
<table border="0" cellpadding="0" cellspacing="0" id="tTitle">
    <tr>
	<td class="left">
	    <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
	</td>
	<td class="middle">

	
    <div class="pagetitle">
        <div><asp:Label ID="lblTitle" runat="server" >录音列表</asp:Label></div>
    </div>
	</td>
	<td class="right">
	    <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
	</td>
    </tr>
</table>
    
    <div id="divMain" >
    <div style="width: 100%">
        <div class="listdiv">
            <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
                <tr>
                    <td class="title">
                        <div class="nowrap">
                            工单编号:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtCASEID" runat="server" CssClass="txt"   ></asp:TextBox>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            主叫号码:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtCALLER" runat="server" CssClass="txt" MaxLength="16" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            工单类型:</div>
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlCASETYPE" runat="server" CssClass="ddl">
                        </asp:DropDownList>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            创建人:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtCREATEPEOPLE" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="title">
                        <div class="nowrap">
                            开始时间:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtSTARTDATEBegin" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox>-<asp:TextBox
                            ID="txtSTARTDATEEnd" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            被叫号码:</div>                        
                    </td>
                    <td class="content" >
                        <asp:TextBox ID="txtCALLED" runat="server" CssClass="txt" MaxLength="16" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>                        
                    </td>
                    <td class="title" colspan="3" >
                        <iframe id="framePlay" runat="server" name="Recordingfrm" width="240" height="45" frameborder="0" marginwidth="0" scrolling="no" src="../Common/playr.htm"></iframe>
                    </td>
                    <td class="content">
                        <div style="width: 100px;" class="nowrap">
                            <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn title_cx"
                                OnClick="btnSearch_Click" /></div>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                </tr>
            </table>
            <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False" OnRowCreated="gvList_RowCreated" OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting" AllowPaging="true" 
                AllowSorting="true" PageSize="10"  SortExpressionValue="AUTOID"  SortDirectionValue="DESC" >
                <Columns>
			    <asp:BoundField DataField="AUTOID" HeaderText="自增编号"  SortExpression="AUTOID" />
			    <asp:BoundField DataField="INUM" HeaderText="录音记录"  SortExpression="INUM" />
			    <asp:BoundField DataField="DURATION" HeaderText="时长(秒)"  SortExpression="DURATION" />
			    <asp:BoundField DataField="PARTYNAMES" HeaderText="主被叫号码"  SortExpression="PARTYNAMES"  Visible="false" />
			    <asp:BoundField DataField="CALLID" HeaderText="主号标识"  SortExpression="CALLID"  Visible="false" />
			    <asp:BoundField DataField="CALLER" HeaderText="主叫号码"  SortExpression="CALLER" />
			    <asp:BoundField DataField="CALLED" HeaderText="被叫号码"  SortExpression="CALLED" />
			    <asp:BoundField DataField="CASEID" HeaderText="工单编号"  SortExpression="CASEID" />
			    <asp:BoundField DataField="CALLTYPE" HeaderText="来电类型"  SortExpression="CALLTYPE"  Visible="false" />
			    <asp:BoundField DataField="CASETYPE" HeaderText="工单类型"  SortExpression="CASETYPE" />
			    <asp:BoundField DataField="STARTDATE" HeaderText="开始时间"  SortExpression="STARTDATE"  DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" />
			    <asp:BoundField DataField="CREATETIME" HeaderText="创建时间"  SortExpression="CREATETIME" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" />
			    <asp:BoundField DataField="CREATEPEOPLEID" HeaderText="创建人编号"  SortExpression="CREATEPEOPLEID" Visible="false" />
			    <asp:BoundField DataField="CREATEPEOPLE" HeaderText="创建人"  SortExpression="CREATEPEOPLE" />
			    <asp:TemplateField HeaderText="操作" ShowHeader="False">
                    <itemtemplate>
                    <div style="white-space: nowrap;">
                    <a href="#" title='<%# Eval("INUM") %>' class="recordPlay">收听</a>  
                    <asp:HyperLink id="hlDownList" runat="server" NavigateUrl='<%# Eval("INUM", "RecordDownLoad.aspx?INUM={0}") %>' Target="_blank" >下载</asp:HyperLink>                  
                    <asp:LinkButton id="lbtnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="False" OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>            
                    </div>
				    </itemtemplate>
                    <headerstyle width="90px" />
                </asp:TemplateField>
                </Columns>	
                <RowStyle CssClass="row" />
                <AlternatingRowStyle CssClass="row2" />
                <HeaderStyle CssClass="header" />	
                <PagerStyle CssClass="pager" />	
            </dp:WebGridView>
        </div>
    </div>
    </div>
    </form>
</body>
</html>
